package com.akaovi.chatroom.domain.vo;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author akaovi
 * @version 1.0
 * @description
 * @date 2022/12/10 11:37
 * @since 2022/12/10 11:37
 */
public class OnlineRl implements Serializable {

    /**
     * 好友账号
     */
    private Integer friendId;

    /**
     * 用户名
     */
    private String username;

    public Integer getFriendId() {
        return friendId;
    }

    public void setFriendId(Integer friendId) {
        this.friendId = friendId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public OnlineRl(Integer friendId, String username) {
        this.friendId = friendId;
        this.username = username;
    }

    public OnlineRl() {
    }

    @Override
    public String toString() {
        return "OnlineRl{" +
                "friendId=" + friendId +
                ", username='" + username + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OnlineRl onlineRl = (OnlineRl) o;
        return Objects.equals(friendId, onlineRl.friendId) && Objects.equals(username, onlineRl.username);
    }

    @Override
    public int hashCode() {
        return Objects.hash(friendId, username);
    }
}
